Language Apple ][+ machine language
Date: | 03/28/10 |
Author: | barrym |
URL: | n/a |
Comments: | 4 |
Info: | n/a |
Score: | (3.01 in 69 votes) |
From the Applesoft prompt, enter 'CALL-151' At the asterisk prompt, enter the following: 1000:A9 63 85 FE A9 14 20 2B 10 A2 23 A0 02 20 4F 10 1010:A9 08 20 2B 10 A2 00 A0 45 C6 FE 30 32 A2 46 A0 1020:24 20 4F 10 A9 17 20 2B 10 F0 D9 48 A6 FE D0 09 1030:A2 6A A0 07 20 4F 10 F0 05 A9 00 20 24 ED A0 08 1040:A6 FE CA D0 01 88 A2 27 20 4F 10 A2 2F 68 A8 BD 1050:5A 10 20 ED FD E8 88 D0 F6 60 AE 8D C7 CF A0 D4 1060:CF A0 D4 C8 C5 A0 D3 D4 CF D2 C5 A0 C1 CE C4 A0 1070:C2 D5 D9 A0 D3 CF CD C5 A0 CD CF D2 C5 AC 8D B9 1080:B9 A0 C2 CF D4 D4 CC C5 D3 A0 CF C6 A0 C2 C5 C5 1090:D2 A0 CF CE A0 D4 C8 C5 A0 D7 C1 CC CC AE 8D 8D 10A0:AE 8D D4 C1 CB C5 A0 CF CE C5 A0 C4 CF D7 CE A0 10B0:C1 CE C4 A0 D0 C1 D3 D3 A0 C9 D4 A0 C1 D2 CF D5 10C0:CE C4 AC 8D CE CF A0 CD CF D2 C5 To execute the program, enter '1000G' at the asterisk prompt. To save the program to tape, enter '1000.10CAW' at the asterisk prompt (put the tape recorder in RECORD mode before you press RETURN) Alternatively, you can exit the monitor with ctrl-c RETURN. Now you can execute with a 'CALL4096', and save to 5 1/4" floppy disk with 'BSAVE BOTTLESONG, A4096, L203' Notice that '1 BOTTLE' and 'NO BOTTLES' are printed to specification. >>>>>>>>>>>>>>>>> 65XX FOREVER!!!!!!!!!!!!!! <<<<<<<<<<<<<<<<<<
Download Source | Write Comment
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments
barrym said on 05/22/10 03:28:56
Note to owners of the original Apple II with Integer Basic in ROM:
Make a small change to this code after entering the above, but before
executing or saving to tape or floppy: at the asterisk prompt enter
103C:1B E5
and you're ready to go!!
barrym said on 06/22/10 07:24:04
I've been playing around with different techniques to reduce the size of the
code. I currently have an upper-case 40-column version that runs in 191 bytes.
This includes '1 BOTTLE' and 'NO MORE BOTTLES' logic, but sublets the integer-
to-ascii output to the host firmware. I think that I've reached my personal
limit, but I would love to hear from other assembly/machine language programmers
about their efforts (any processor welcome, complete working examples preferred).
I have a 222 byte version written in 6800 assembler that does it's own itoa and
prints the exact 80-column mixed-case lyrics, but it hasn't posted yet...
Please feel free to drop any code or advice in this comment section (even at its
worst it couldn't be nearly as bad as those retarded spambot comments infesting
this website!). See the 6510 Assembler comment section for my 191-byte effort.
Han ten Have said on 09/21/10 12:42:59
Comment written 1 May 2010 :
When I first saw this hex entry file my reaction was :
"Couldn't he just show the dammed assembly code ?".
Then because I am very interested in computer architecture
but never got around to look at the 6502 or the Apple II
in detail I decided to try to solve this binary conundrum.
After I spend a whole sunday playing for detective on the
internet and learning about the 6502's and the Apple II's
limitations caused by "Wozniakal" hardware reductions I was
very pleased with what I found.
This program is highly structured and "fully programmed".
With that I mean the last verse with "Go to the store ..."
is also constructed with parts used in other verses instead
of dangling at the programs end in one big string like in
most submissions to this site. That is when they even
bother to include that verse ! Some even treat the previous
verse in the same manner being only one logical step away
from inputting all 100 verses as a single large text file.
That is not programming, it's a joke like "99" !
When I found out the purpose of all the details and
quirks - they all are meaningful - and even emulated the
program in Modula-2 so that I could check its workings and
my understanding of it, my original plan was to put the
assembly version in this comment. But then I changed my
mind. Playing detective had brought me so much pleasure I
don't want to withhold that to others. Just trust me that
the outcome is a perfect program !
barrym said on 09/23/10 07:19:08
@Han ten Have: I sincerely thank you for your kind comment. You gained my respect
with your 'Debug' entry, which is one of the oldest examples on this site that goes
through the trouble of actually 'constructing' the reference lyrics. I'm just a
hobbyist with a passion for the old 8-bit machines of the late 70s and early 80s,
and I thought that labeling my entry as 'machine' language rather than 'assembly'
language would set it apart from the others. I have pending submissions in 6502
assembly, 6800 assembly, and 8008 assembly that were written after this, but have
not yet been published here. Properly commented 65xx assembler samples can be found
in the '6510 Assembler' comment section (the 186 byte version is highly eccentric)